;+
; NAME:
;
;
;
; PURPOSE:
;
;
;
; CATEGORY:
;
;
;
; CALLING SEQUENCE:
;
;
;
; INPUTS:
;
;
;
; OPTIONAL INPUTS:
;
;
;
; KEYWORD PARAMETERS:
;
;
;
; OUTPUTS:
;
;
;
; OPTIONAL OUTPUTS:
;
;
;
; COMMON BLOCKS:
;
;
;
; SIDE EFFECTS:
;
;
;
; RESTRICTIONS:
;
;
;
; PROCEDURE:
;
;
;
; EXAMPLE:
;
;
;
; MODIFICATION HISTORY:
;
;-
PRO  marklines1,xr,dv=dv,_extra=_extra
 if not keyword_set(dv) then dv=0
plot, 
 Spectralfeatures = [ $
                    {wv: 912,  label: 'LL',          psLabel: 'LL' }, $
                                ;{wv: 937.,  label: 'S VI',        psLabel: 'S VI'  }, $
                                ;{wv: 973.,  label: 'Ly !4c!3',    psLabel: 'Ly !9g!3' }, $
                                ;{wv: 991.,  label: 'N III',       psLabel: 'N III' }, $
                                ;{wv: 1026., label: 'Ly !4b!3',    psLabel: 'Ly !9b!3' }, $
                                ;{wv: 1034., label: 'O VI',        psLabel: 'O VI' }, $
                                ;{wv: 1216., label: 'Ly !4a!3',    psLabel: 'Ly !9a!3' }, $
                                ;{wv: 1260., label: 'Si II',       psLabel: 'Si II' }, $
                                ;{wv: 1303., label: 'O I + Si II', psLabel: 'O I + Si II' }, $
                                ;{wv: 1334., label: 'C II',        psLabel: 'C II' }, $
                                ;{wv: 1397., label: 'Si IV',       psLabel: 'Si IV' }, $
                                ;{wv: 1526., label: 'Si II',       psLabel: 'Si II' }, $
   ;                             {wv: 1548.204, label: 'C IV',        psLabel: 'C IV' }, $
                                {wv: 1551, label: 'C IV',        psLabel: 'C IV' }, $
                                ;{wv: 1640., label: 'He II',       psLabel: 'He II' }, $
					 	
 ;                   {wv: 1670., label: 'Al II',       psLabel: 'Al II' }, $
  ;                  {wv: 1807.311, label: 'SiI',        psLabel: 'SiI' }, $
   ;                 {wv: 1808.01, label: 'SiII',        psLabel: 'SiII' }, $
 ;                   {wv: 1816.93, label: 'SiII*',        psLabel: 'SiII*' }, $
 ;                   {wv: 1845.52, label: 'SiI',        psLabel: 'Si I' }, $
 ;                   {wv: 1854.72, label: 'Al III',        psLabel: 'Al III' }, $
      ;              {wv: 1863, label: 'Al III',        psLabel: 'Al III' }, $
;                    {wv: 1909., label: 'C III]',      psLabel: 'C III]' }, $

                    {wv: 2400, label: 'Fe II',       psLabel: 'Fe II UV2' },$
                    {wv: 2600, label: 'Fe II',       psLabel: 'Fe II UV1' },$
  ;                  {wv: 2796.35, label: 'Mg II',       psLabel: 'Mg II' },$
                    {wv: 2803, label: 'Mg II',       psLabel: 'Mg II2803' },$
                    {wv: 2853, label: 'Mg I',       psLabel: 'Mg I2853' },$
   ;                 {wv: 2829.9, label: 'He I',       psLabel: 'He I' },$
     ;               {wv: 2946, label: 'He I',       psLabel: 'He I' },$
                    {wv: 3188, label: 'He I',       psLabel: 'He I3189' },$
                    {wv: 6564, label: 'Ha',       psLabel: 'H\alpha' },$
                    {wv: 4862, label: 'Hb',       psLabel: 'H\beta' },$
                    {wv: 4341, label: 'Hc',       psLabel: 'H\gamma' },$
                    {wv: 4103, label: 'Hd',       psLabel: 'H\delta' },$
                    {wv: 3889, label: 'He I',       psLabel: 'He I3889' }]

 features = spectralFeatures

 obsLambda = exp(alog(features.wv)+dv/3d5)
 xr = !X.CRANGE

 thick = 1.
 labelIndex = 1
 IF !D.NAME EQ 'PS' THEN BEGIN
    thick = 2.
    labelIndex = 2
 ENDIF

 good = WHERE( xr[0] LE obsLambda and obsLambda LE xr[1], nGood )
 IF nGood EQ 0 THEN RETURN
 obsLambda_norm=!X.S[0]+!X.S[1]*obsLambda
 FOR i = 0, nGood - 1 DO BEGIN
    index = good[i]
    OPLOT, [obsLambda[index], obsLambda[index]], [!Y.CRANGE[0],0.1*(!Y.crange[1]-!Y.crange[0])], $
           color=fsc_color('olive'), thick=thick,_extra=_extra,linestyle=2
    if features[index].wv eq 2400 or features[index].wv eq 2600 then begin 
    XYOUTS, obsLambda_norm[index], 0.15 , textoidl(features[index].(labelIndex)), $
            orientation=90., color=djs_icolor( 'brown' ),_extra=_extra,/normal
	endif else begin
    XYOUTS, obsLambda_norm[index], 0.15 , textoidl(features[index].(labelIndex)),$
            orientation=90., color=djs_icolor( 'brown' ),_extra=_extra,/normal
	endelse
 ENDFOR

end
